function calculateArea(shape) {
    if ('radius' in shape) {
        return 3.14 * shape.radius * shape.radius;
    }
    else if ('width' in shape) {
        return shape.width * shape.height;
    }
    else {
        return shape.base * shape.height / 2;
    }
}
console.log(calculateArea({ radius: 5 }));
console.log(calculateArea({ width: 5, height: 6 }));
console.log(calculateArea({ base: 5, height: 6 }));
// console.log(calculateArea({radius:5,width:6,height:7}));
